Skip to content

bugfix(debug): Fix memory corruption in DebugCrash() #1371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2025

Conversation

xezon
Copy link

@xezon xezon commented Jul 27, 2025

Merge with Rebase

This change fixes the memory corruption in DebugCrash().

It has 2 commits. The first is the bug fix. The second is fixing a few more theoretical offenders in Debug.cpp.

The corruption was introduced by #1275 and only manifested as a runtime issue in VC6 Debug because of #858.

@xezon xezon added Blocker Severity: Minor < Major < Critical < Blocker Debug Is mostly debug functionality ThisProject The issue was introduced by this project, or this task is specific to this project Crash This is a crash, very bad labels Jul 27, 2025
@xezon xezon force-pushed the xezon/fix-debug-crash branch from 21188b2 to 43bdd9c Compare July 27, 2025 20:22
@xezon xezon added Critical Severity: Minor < Major < Critical < Blocker and removed Blocker Severity: Minor < Major < Critical < Blocker labels Jul 27, 2025
Copy link

@Caball009 Caball009 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have not checked if this deals with all potential offenders, but it fixes the immediate crash.

@xezon
Copy link
Author

xezon commented Jul 28, 2025

In a follow up we can make the zero write in vsnprintf in stdio_adapter.h conditional.

@xezon xezon force-pushed the xezon/fix-debug-crash branch from 43bdd9c to 5e5c9e6 Compare July 28, 2025 15:46
@xezon xezon merged commit 421c627 into TheSuperHackers:main Jul 28, 2025
14 checks passed
@xezon xezon deleted the xezon/fix-debug-crash branch July 28, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash This is a crash, very bad Critical Severity: Minor < Major < Critical < Blocker Debug Is mostly debug functionality ThisProject The issue was introduced by this project, or this task is specific to this project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug VC6 build crashes
2 participants